
{extend name="common/main"}

{block name="css"}
<!-- 本页面需要额外添加的css请在此处添加 -->
<link rel="stylesheet" href="/mobiled/css/user.css">
<script type="text/javascript" src="/mobiled/js/mobile.js" ></script>

<script type="text/javascript" src="/mobiled/js/modernizr.js"></script>
{/block}
{block name="body"}
<body>
<header>
    <div class="tab_nav">
        <div class="header">
            <div class="h-left"><a class="sb-back" href="{:url('User/index')}" title="返回"></a></div>
            <div class="h-mid">资金管理</div>
            <div class="h-right">
                <aside class="top_bar">
                    <div onClick="show_menu();$('#close_btn').addClass('hid');" id="show_more"><a href="javascript:;"></a> </div>
                </aside>
            </div>
        </div>
    </div>
</header>
{include file="common/goods_nav"/}
<div id="tbh5v0">
    <div style="background:#fff;">
        <ul class="il_title">
            <li>
                <p class="cf22" id="wait_score">￥{$user['user_money']}元</p>
                <p>账户余额</p>
            </li>
            <li>
                <a style="padding: 0 10px;text-align: center;color: #fff;
				border: 1px solid #FE6D0B;display: inline-block;border-radius: 3px;
				box-shadow: 0 1px 2px #E7E7E7;background: #f60;" href="{:Url('User/recharge')}">充值</a>
                <!--<a style="padding: 0 10px;text-align: center;color: #fff;-->
				<!--border: 1px solid #FE6D0B;display: inline-block;border-radius: 3px;-->
				<!--box-shadow: 0 1px 2px #E7E7E7;background: #f60;" href="{:Url('User/withdrawals')}">提现</a>-->
            </li>
        </ul>
        <div class="il_nav" id="J_il_nav">
            <a href="{:url('User/account',array('type'=>1))}" {if  $type eq 1}class="active"{/if} data-list="1">全部</a>
            <a href="{:url('User/account',array('type'=>2))}" {if $type eq 2}class="active"{/if}  data-list="2">消费记录</a>
            <a href="{:url('User/account',array('type'=>3))}" {if $type eq 3}class="active"{/if} data-list="3">充值记录</a>
        </div>
        <!--<div class="user_login_title"><h2><em>账户余额</em><span>￥{$user['user_money']}元</span></h2></div>-->
        {empty name="res"}
            <p class="font12">您没有任何资金的变动哦！</p>
            {else/}
            <div class="Funds">
                <ul>
                    {volist name='res' id='vo' key='k'}
                    <li class="Funds_li" >
                        <span class="icon"></span>
                        {empty name="$vo.nickname"}
                        <span>金额:<em>{$vo.user_money}</em>,积分:<em>{$vo.pay_points}</em></span>
                        <span>{$vo.change_time|date='Y-m-d H:i:s',###}</span>
                        <span>{$vo.desc}</span>
                        {else /}
                        <span>充值金额:<em>{$vo.account}</em></span>
                        <span>支付状态:<em>{if $vo.pay_status eq 0}待支付{else/}充值成功{/if}</em></span>
                        <span>充值时间:<em>{$vo.ctime|date='Y-m-d H:i:s',###}</em></span>
                        <span>支付方式:<em>{$vo.pay_name}</em></span>
                        {/empty}
                    </li>
                    {/volist}
                </ul>
            </div>
            {notempty name="res"}
                <div id="getmore" style="font-size:.24rem;text-align: center;color:#888;padding:.25rem .24rem .4rem; clear:both">
                    <a href="javascript:void(0)" onClick="ajax_sourch_submit()">点击加载更多</a>
                </div>
            {/notempty}
        {/empty}
    </div>
    <a href="javascript:goTop();" class="gotop"><img src="/assets/img/topup.png"></a>
</div>
{include file="common/bar"}
</body>
{/block}
{block name="js"}
<script>
    var  page = 1;
    /*** ajax 提交表单 查询订单列表结果*/
    function ajax_sourch_submit()
    {
        page += 1;
        $.ajax({
            type : "GET",
            url:"{:Url('account')}",
            data:{
                page:page,
                type:{$type}
            },
            success: function(data)
            {
                if($.trim(data) == '')
                    $('#getmore').hide();
                else
                    $(".Funds > ul").append(data);
            }
        });
    }
</script>

<script type="text/javascript">
    function goTop(){
        $('html,body').animate({'scrollTop':0},600);
    }
</script>
{/block}